package MVCEX2BT6;

public class Models {

	public void CheckIsEvenOdd(Object obj){
		if (obj.getOption().equalsIgnoreCase("chan")){
			int i=0;
			int sum=0;
			System.out.print("Day so: ");
			do{
				if(i%2==0){
					System.out.print(" "+i);
					sum+=1;
				}
				i=i+1;
			}
			while(i<=obj.getNumber());
			System.out.println("");
			System.out.println("Co "+sum+" so chan");
		}
		if(obj.getOption().equalsIgnoreCase("le")){
			int i=0;
			int sum=0;
			System.out.print("Day so: ");
			do{
				if(i%2!=0){
					System.out.print(" "+i);
					sum+=1;
				}
				i=i+1;
			}
			while(i<=obj.getNumber());
			System.out.println("");
			System.out.println("Co "+sum+" so le");
		}
		
	}
}
